File-per-table Tablespaces

配置file-per-table 配置

InnoDB 默认使用file-per-table 配置,如果禁用innodb_file_per_table 会导致system 表空间中创建表.

开启file-per-table xuanxiang

[mysqld]
innodb_file_per_table=ON
Warning

innodb_file_per_table 在MySQL 5.6 以前的版本是默认启用的.

file-per-table 的优势

使用系统表空间或者通用表空间等共享表空间相比.file-per-table 有以下优势.

file-per-table 劣势